home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994…tember: Reference Library / Dev.CD Sep 94.toast / Technical Documentation / Inside Macintosh / Devices / Devices.rsrc / TOC#_1000 < prev   
Encoding:
Text File  |  1994-07-24  |  13.8 KB  |  23 lines

  1. DevicesContentsFigures, Tables, and Listings
  2. About This BookFormat of a Typical Chapter
  3. Conventions Used in This Book
  4. Special FontsTypes of NotesAssembly-Language InformationDevelopment Environment
  5. For More InformationDevice Manager#Introduction to Devices and Drivers$Figure 1-1    Devices and the MacintoshAbout the Device Manager%Figure 1-2    Communication with devicesThe Device Control Entry$Figure 1-3    
  6. The device control entry
  7. The Unit TableFigure 1-4    
  8. The unit table
  9. The Driver I/O Queue>Figure 1-5    
  10. Relationship of the Device Manager data structures
  11. Driver RoutinesFTable 1-1    Device Manager I/O functions and responsible driver routinesDriver Resources)Figure 1-6    Structure of a driver resource
  12. Using the Device Manager0Figure 1-7    Hierarchy of Device Manager functions+Figure 1-8    
  13. Device Manager parameter blocks#
  14. Opening and Closing Device Drivers#Listing 1-1    Opening a device driver#Listing 1-2    Closing a device driver!Communicating With Device Drivers(Listing 1-3    Reading from a device driver'Listing 1-4    
  15. Writing to a device driver)Controlling and Monitoring Device Drivers7Listing 1-5    
  16. Controlling and monitoring a device driver
  17. Writing a Device DriverCreating a Driver ResourceFigure 1-9    The driver header"Listing 1-6    
  18. Driver flag constants.Listing 1-7    An assembly-language driver header Responding to the Device Manager)Entering and Exiting From Driver Routines4Listing 1-8    An assembly-language dispatching routineWriting Open and Close Routines(Listing 1-9    
  19. Example driver open routine*Listing 1-10    
  20. Example driver close routineWriting a Prime Routine*Listing 1-11    
  21. Example driver prime routine#Writing Control and Status Routines+Listing 1-12    Example driver control routine*Listing 1-13    Example driver status routine
  22. Handling Asynchronous I/O
  23. Installing a Device DriverTable 1-2    Reserved unit numbers-Listing 1-14    
  24. Finding space in the unit table*Writing a Chooser-Compatible Device DriverHow the Chooser WorksFigure 1-10    
  25. The Chooser window!Creating a Chooser Extension FileCreating a Device Package)Figure 1-11    Structure of a device packageTable 1-3    Device package flagsResponding to the Chooser -Table 1-4    Chooser messages and their meanings
  26. Allocating Private StorageWriting a Desk AccessoryHow Desk Accessories Work/Creating a Driver Resource for a Desk Accessory%
  27. Opening and Closing a Desk AccessoryResponding to Events
  28. Device Manager ReferenceData StructuresDevice Manager Parameter BlockDevice Control EntryDevice Manager Functions"Opening and Closing Device Drivers
  29. OpenDriverPBOpenOpenSlot OpenDeskAcc CloseDriverPBClose CloseDeskAcc"
  30. Communicating With Device DriversFSReadPBReadFSWritePBWrite)Controlling and Monitoring Device DriversControl    PBControlStatusPBStatusKillIOPBKillIO%Writing and Installing Device Drivers
  31. DriverInstallDriverInstallReserveMem DriverRemove GetDCtlEntry
  32. IODoneFetch
  33. Stash
  34.  
  35. ResourcesThe Driver Resource$Listing 1-15     'DRVR' resource format
  36. Summary of the Device Manager Slot ManagerIntroduction to Slots and Cards:Figure 2-1    Simplified processor-bus and NuBus architecture
  37. Slot Address Allocations*Figure 2-2    
  38. The NuBus 32-bit address space-Table 2-1    Slot address allocations by slot ID    
  39. Firmware
  40. The sResource0Figure 2-3    The structure of a typical sResource -Table 2-2    Large data types used in sResourcesBFigure 2-4    The format of the sBlock and sExecBlock data structuresType and Name Entries&Figure 2-5    
  41. The sRsrcType entry format.
  42. The Board sResource and Functional sResources$Figure 2-6    
  43. A sample board sResourceThe sResource Directory5Figure 2-7    
  44. The structure of the sResource directory The Format BlockBFigure 2-8    The format block and sResources for a sample video card
  45. About the Slot ManagerUsing the Slot Manager#
  46. Enabling and Disabling NuBus Cards!Deleting and Restoring sResources"
  47. Enabling and Disabling sResources/Listing 2-1    Disabling and enabling an sResource
  48. Searching for sResources*Table 2-3    The Slot Manager search routines7Listing 2-2    Searching for a specified type of sResource%Obtaining Information From sResources8Listing 2-3    
  49. Searching for the name of a board sResource0
  50. Installing and Removing Slot Interrupt HandlersSlot Manager ReferenceData Structures
  51. Slot Manager Parameter BlockSlot Information Record
  52. Format Header Record
  53. Slot Parameter RAM RecordSlot Execution Parameter BlockSlot Interrupt Queue ElementSlot Manager Routines+Determining the Version of the Slot ManagerSVersionFinding sResources    SRsrcInfo    SGetSRsrc
  54. SGetTypeSRsrc
  55. SNextSRsrcSNextTypeSRsrc#Getting Information From sResources
  56. SReadDrvrName    SReadByte
  57.  
  58. SReadWord    SReadLong SGetCString
  59.  
  60. SGetBlock SFindStruct SReadStruct8
  61. Enabling, Disabling, Deleting, and Restoring sResources
  62. SetSRsrcState
  63. SDeleteSRTRec
  64.  
  65. InsertSRTRecKTable 2-4    How the Slot Manager determines the base address of a slot device
  66. SUpdateSRT3
  67. Loading Drivers and Executing Code From sResources
  68. SGetDriverSExec?
  69. Getting Information About Expansion Cards and Declaration ROMs    SReadInfo SReadFHeader
  70. SCkCardStat SCardChanged SFindDevBase&Accessing Expansion Card Parameter RAM SReadPRAMRec
  71. SPutPRAMRec"
  72. Managing the Slot Interrupt Queue SIntInstall
  73. SIntRemove
  74. Low-Level Routines InitSDeclMgr
  75. SCalcSPointer    SCalcStepSFindBigDevBaseSFindSInfoRecPtr
  76. SFindSRsrcPtr SGetSRsrcPtr
  77. SInitPRAMRecsSInitSRsrcTable SOffsetData SPrimaryInit
  78. SPtrToSlot SReadPBSize
  79. SSearchSRT
  80. Summary of the Slot Manager SCSI ManagerIntroduction to SCSI ConceptsSCSI Bus SignalsTable 3-1    SCSI bus signals
  81. SCSI Bus Phases4Figure 3-1    SCSI bus phases and allowable transitions
  82. SCSI Commands
  83. SCSI MessagesSCSI HandshakingAbout the SCSI Manager(Figure 3-2    
  84. The role of the SCSI Manager'Conformance With the SCSI Specification(Overview of SCSI Manager Data Structures
  85. The Structure of Block DevicesThe Driver Descriptor RecordThe Partition MapUsing the SCSI ManagerReading Data From a SCSI Device,Listing 3-1    
  86. Reading data from a SCSI deviceUsing CDB and TIB Structures(Listing 3-2    Using TIB and CDB structuresUsing the SCSIComplete Function"Choosing Polled or Blind TransfersSCSI Manager ReferenceData StructuresDriver Descriptor Record
  87. Partition Map Entry RecordSCSI Manager TIB InstructionsscIncscNoInc
  88. scAddscMovescLoopscNopscStopscCompSCSI Manager Routines    SCSIResetSCSIGet
  89. SCSISelect
  90. SCSISelAtnSCSICmd    SCSIMsgIn
  91. SCSIMsgOutSCSIRead
  92. SCSIRBlind    SCSIWrite
  93. SCSIWBlind
  94.  
  95. SCSIComplete    
  96. SCSIStat
  97. Summary of the SCSI ManagerSCSI Manager 4.3About SCSI Manager 4.3,Figure 4-1    The SCSI Manager 4.3 architecture    Transport
  98. SCSI Interface ModulesSystem Performance
  99. CompatibilityUsing SCSI Manager 4.3Locating SCSI DevicesDescribing Data BuffersHandshaking InstructionsError Recovery TechniquesOptional Features
  100. Writing a SCSI Device Driver!Loading and Initializing a DriverSelecting a Startup Device%Transitions Between SCSI Environments
  101. Handling Asynchronous RequestsHandling Immediate Requests
  102. Virtual Memory Compatibility 
  103. Writing a SCSI Interface Module SIM Initialization and Operation$Supporting the Original SCSI Manager4Table 4-1    Original SCSI Manager parameter conversionHandshaking of Blind TransfersSupporting DMALoading Drivers
  104. SCSI Manager 4.3 ReferenceData StructuresSimple Data TypesDevice Identification RecordCommand Descriptor Block RecordScatter/Gather List Element$
  105. SCSI Manager Parameter Block HeaderSCSI I/O Parameter Block SCSI Bus Inquiry Parameter Block"SCSI Abort Command Parameter Block"SCSI Terminate I/O Parameter Block+SCSI Virtual ID Information Parameter Block SCSI Load Driver Parameter Block*SCSI Driver Identification Parameter Block
  106. SIM Initialization RecordSCSI Manager 4.3 FunctionsClient Functions
  107. SCSIAction,Table 4-2    SCSIAction function selector codes
  108. SCSINop
  109. SCSIExecIO
  110. SCSIBusInquiry SCSIReleaseQSCSIAbortCommand SCSIResetBusSCSIResetDeviceSCSITerminateIOSCSIGetVirtualIDInfoSCSILoadDriverSCSICreateRefNumXrefSCSILookupRefNumXrefSCSIRemoveRefNumXrefSIM Support FunctionsSCSIRegisterBus
  111. SCSIDeregisterBusSCSIReregisterBus
  112. SCSIKillXPT EnteringSIM
  113. ExitingSIM MakeCallbackSIM Internal FunctionsSIMInit
  114.  
  115. SIMActionSIMInterruptPoll
  116. SCSIOldCall
  117. NewOldCall
  118. SCSIRegisterWithNewXPT
  119. Summary of SCSI Manager 4.3 ADB ManagerAbout the Apple Desktop BusCharacteristics of ADB DevicesAbout the ADB Manager/Figure 5-1    
  120. The ADB Manager and device handlers ADB Commands7Figure 5-2    Command formats for Talk, Listen, and Flush 'Figure 5-3    Command format for SendResetADB Transactions$Figure 5-4    A typical ADB transactionADB Device Registers
  121. Register 03Table 5-1    Register 0 in the Apple Standard keyboard
  122. Register 3(Figure 5-5    
  123. Format of device register 3 #Table 5-2    Bits in device register 3<Default ADB Device Address and Device Handler Identification.Table 5-3    Defined default ADB device addresses$Table 5-4    Special device handler IDsADB Device Table 4Table 5-5    Typical ADB device table at initializationAddress Resolution'Figure 5-6    Resolving address conflicts ADB CommunicationFigure 5-7    Polling the ADB NFigure 5-8    
  124. How an ADB device responds to a polling request by the ADB Manager)Figure 5-9    The ADB service request signal=Figure 5-10    
  125. An ADB device asserts the service request signal
  126. Using the ADB ManagerChecking for the ADB Manager%Getting Information About ADB DevicesKListing 5-1    Determining whether an ADB device is an Apple Extended keyboard
  127. Communicating With ADB Devices<Figure 5-11    
  128. The ADBOp routine and an ADB completion routine0Listing 5-2    Sending an ADB command synchronously7Listing 5-3    Reading the current state of the LED lights7Listing 5-4    Setting the current state of the LED lights<Listing 5-5    Counting in binary using a keyboard’s LED lightsWriting an ADB Device Handler Installing an ADB Device Handler,Listing 5-6    Installing an ADB device handler6Listing 5-7    Installing a routine pointer into JADBProcCreating an ADB Device Handler$Listing 5-8    
  129. A sample device handlerADB Manager ReferenceData StructuresADB Data BlockADB Information BlockADB Operation BlockADB Manager RoutinesInitializing the ADB Manager    ADBReInitCommunicating Through the ADBADBOpGetting ADB Device Information    CountADBs
  130.  
  131. GetIndADB
  132. GetADBInfoSetting ADB Device Information
  133. SetADBInfoApplication-Defined RoutinesADB Device Handlers
  134. MyDeviceHandler 
  135. ADB Command Completion RoutinesMyCompletionRoutine
  136. Summary of the ADB Manager
  137. Power ManagerAbout the Power Manager.Figure 6-1    A network driver’s sleep dialog boxThe Power-Saver StateThe Idle StateThe Sleep StateThe Sleep Queue
  138. Sleep RequestsJTable 6-1    Response of network services to sleep requests and sleep demands
  139. Sleep DemandsWakeup Demands
  140. Sleep-Request RevocationsPower Manager Dispatch
  141. Using the Power Manager1
  142. Determining Whether the Power Manager Is PresentCDetermining Whether the Power Manager Dispatch Routines are PresentDListing 6-1    
  143. Determining which Power Manager dispatch routines exist$Enabling or Disabling the Idle State0Setting, Disabling, and Reading the Wakeup Timer$Listing 6-2    Setting the wakeup timer
  144. Installing a Sleep Procedure.Listing 6-3    Adding an entry to the sleep queue7
  145. Using Application Global Variables in Sleep ProceduresPListing 6-4    
  146. Installing a sleep procedure that uses application global variablesWriting a Sleep Procedure1Listing 6-5    Accepting and denying a sleep requestListing 6-6    A sleep procedureCListing 6-7    Retrieving the sleep queue record and the selector codeAListing 6-8    Displaying a dialog box in response to a sleep demand9Listing 6-9    A modal dialog filter function that times out!Switching Serial Power On and Off*Monitoring the Battery and Battery ChargerPower Manager ReferenceData StructuresSleep Queue RecordHard Disk Queue StructureWakeup Time StructureBattery Information StructureBattery Time StructurePower Manager RoutinesControlling the Idle State
  147. IdleUpdate
  148. EnableIdle DisableIdle GetCPUSpeed)
  149. Controlling and Reading the Wakeup Timer    SetWUTime
  150. DisableWUTime    GetWUTime
  151. Controlling the Sleep Queue
  152. SleepQInstall SleepQRemove
  153. Controlling Serial PowerAOnAOnIgnoreModemBOnAOffBOff(Reading the Status of the Internal Modem ModemStatus9Reading the Status of the Battery and the Battery Charger
  154. BatteryStatusPower Manager Dispatch Routines0Determining the Power Manager Features Available
  155. PMSelectorCount
  156. PMFeatures'Controlling the Sleep and Wakeup TimersGetSleepTimeoutSetSleepTimeoutAutoSleepControl IsAutoSlpControlDisabled
  157. GetWakeupTimerSetWakeupTimerControlling the Dimming TimerGetDimmingTimeoutSetDimmingTimeoutDimmingControl IsDimmingControlDisabledControlling the Hard Disk
  158. GetHardDiskTimeoutSetHardDiskTimeoutHardDiskPoweredSpinDownHardDisk
  159. IsSpindownDisabledSetSpindownDisable
  160. HardDiskQInstall
  161. HardDiskQRemove1
  162. Getting Information About the Internal BatteriesGetScaledBatteryInfo
  163.  
  164. BatteryCountGetBatteryVoltage
  165. GetBatteryTimes
  166. Controlling the Internal ModemGetIntModemInfoSetIntModemStateControlling the ProcessorMaximumProcessorSpeedCurrentProcessorSpeedFullProcessorSpeedSetProcessorSpeedIsProcessorCyclingEnabledEnableProcessorCyclingGetting and Setting the SCSI IDGetSCSIDiskModeAddressSetSCSIDiskModeAddress
  167. Application-Defined RoutinesSleep Procedures MySleepProcHard Disk Spindown FunctionMyHDSpindownProc
  168. Summary of the Power Manager
  169. Serial Driver$Introduction to Serial Communication+
  170. Asynchronous and Synchronous CommunicationDuplex CommunicationFlow Control Methods*Asynchronous Serial Communication Protocol(Figure 7-1    The format of serialized bitsThe RS-422 Serial Interface
  171. About the Serial DriverMacintosh Serial Architecture(Figure 7-2    The role of the Serial DriverSerial Communication ErrorsUsing the Serial Driver#Listing 7-1    Using the Serial Driver
  172. Opening the Serial Driver$Specifying an Alternate Input BufferSetting the Handshaking Options%Setting the Baud Rate and Data Format'Reading and Writing to the Serial Ports
  173. Synchronous I/O RequestsAsynchronous I/O RequestsClosing the Serial Driver
  174. Synchronous ClockingSerial Driver ReferenceSerial Driver Routines    
  175. SerReset)Figure 7-3    The serConfig parameter format    SerSetBuf    SerHShake    SerSetBrk
  176.  
  177. SerClrBrk    SerGetBuf
  178.  
  179. SerStatus
  180. Low-Level Routines
  181. Summary of the Serial Driver    
  182. Glossary
  183. Index